<style scoped>
  .box {
    width: 100px;
    height: 100px;
    background: pink;
  }
</style>


<template>
  <div>
    <h2>App</h2>
    <button @click="isShow=!isShow">切换</button>
    <transition 
      enter-active-class="animate__backInLeft" 
      leave-active-class="animate__backOutRight">
      <div v-show="isShow" class="box animate__animated"></div>
    </transition>

  </div>
</template>

<script>
export default {
  name: 'App',
  data () {
    return {
      isShow: true,
    }
  }
}
</script>

